﻿using CommunityToolkit.Mvvm.ComponentModel;
using Company.Sqlite.Models;
using MaterialDesignThemes.Wpf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 无人值守地磅称重系统.Dialogs;
using 无人值守地磅称重系统.Interfaces;

namespace 无人值守地磅称重系统.Services
{
    public class Session : ObservableObject, ISession
    {
        private string title;
        public string Title { get => title; set => SetProperty(ref title, value); }

        private User user = new User();
        public User CurrentUser { get => user; set => SetProperty(ref user, value); }

        public void Show(string content)
        {
            App.Current.Dispatcher.Invoke(() =>
            {
                DialogHost.Show(new Dialog(content, System.Windows.MessageBoxButton.OK), "RootDialog");
            });
        }
    }
}
